// 物料配送路由模块
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const MATERIAL_DISTRIBUTION: AppRouteRecordRaw = {
  path: '/material-distribution',
  name: '物料配送',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.material-distribution',
    requiresAuth: true,
    icon: 'icon-send',
    roles: ['*'],
    order: 3,
  },
  children: [
    // 配送任务
    {
      path: '/delivery-task',
      name: '配送任务',
      component: () =>
        import('@/views/material-distribution/list/delivery-task/index.vue'),
      meta: {
        locale: 'menu.deliveryTask',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 扫码交接
    // {
    //   path: '/deliveryScanHandover',
    //   name: 'DeliveryScanHandover',
    //   component: () =>
    //     import('@/views/material-distribution/list/deliveryScanHandover/index.vue'),
    //   meta: {
    //     locale: 'menu.deliveryScanHandover',
    //     requiresAuth: true,
    //     roles: ['*'],
    //   },
    // },
    // 接收直配
    {
      path: '/receive-direct-distribution',
      name: '接收直配',
      component: () =>
        import(
          '@/views/material-distribution/list/receive-direct-distribution/index.vue'
        ),
      meta: {
        locale: 'menu.receiveDirectDistribution',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
  ],
};

export default MATERIAL_DISTRIBUTION;
